/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Modelo;

import Entidades.Asesor;
import Entidades.Proyecto;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author julian
 */
@Stateless
public class FachadaAsesor 
{

   @PersistenceContext(unitName = "ProyectosPU")
    private EntityManager em;
    

    public void adicionar(Asesor asesor) {
        em.persist(asesor);
    }

    public void actualizar(Asesor asesor) {
        em.merge(asesor);
    }

    public void eliminar(Asesor asesor) {
        em.remove(em.merge(asesor));
    }
}
